<%--
  Created by IntelliJ IDEA.
  User: ll
  Date: 2022/9/20
  Time: 9:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<html>
<head>
    <title>Title</title>
    <script src="webjars/jquery/3.6.1/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="webjars/bootstrap/3.4.1/dist/css/bootstrap.min.css">
    <script src="webjars/bootstrap/3.4.1/dist/js/bootstrap.min.js"></script>
</head>

<body>
<div class="container">
 <div class="panel panel-primary">
     <div class="panel-heading">
         <h2 class="panel-title">
            <h3>
                商品信息
            </h3>
         </h2>
     </div>
     <table class="table table-hover">
         <!-- On rows -->
         <tr class="active">
             <td>id</td>
             <td>名称</td>
             <td>单价</td>
             <td>购买数</td>
             <td>操作</td>
         </tr>
<%--         <tr class="success">...</tr>--%>
<%--         <tr class="warning">...</tr>--%>
<%--         <tr class="danger">...</tr>--%>
<%--         <tr class="info">...</tr>--%>

         <!-- On cells (`td` or `th`) -->
         <c:forEach items="${cart.map}" var="p">
         <tr>
             <td class="active">${p.value.product.pid}</td>
             <td class="success">${p.value.product.pname}</td>
             <td class="warning">${p.value.product.price}</td>
             <td class="danger">${p.value.num}</td>
             <td>
             <a href="/index?cmd=remove&pid=${p.value.product.pid}" class="btn btn-success btn-sm">删除</a>
             </td>
         </tr>
         </c:forEach>
     </table>
     <div class="panel-footer text-right">
         <a href="/index.jsp" class="btn btn-success btn-sm">继续挑选</a>
         <a href="/index?cmd=clear" class="btn btn-danger btn-sm">清空购物车</a>
        小小店铺
     </div>
 </div>
</div>
</body>
</html>
